]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
grabHelper: Drop addActor/removeActor calls
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 19 Nov 2021 12:31:16 +0000 (13:31 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 29 Jan 2022 01:19:14 +0000 (02:19 +0100)
These no longer do what they meant to do, and are now unused.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2046>

js/ui/grabHelper.js

index 47a332a246c8bb059fbefd9f1c995639f6eacf7d..11e06700e42eb4decf6794ecac5e042478839b17 100644 (file)
@@ -27,44 +27,14 @@ var GrabHelper = class GrabHelper {
 
         this._grabStack = [];
 
-        this._actors = [];
         this._ignoreUntilRelease = false;
 
         this._modalCount = 0;
     }
 
-    // addActor:
-    // @actor: an actor
-    //
-    // Adds @actor to the set of actors that are allowed to process events
-    // during a grab.
-    addActor(actor) {
-        actor.__grabHelperDestroyId = actor.connect('destroy', () => {
-            this.removeActor(actor);
-        });
-        this._actors.push(actor);
-    }
-
-    // removeActor:
-    // @actor: an actor
-    //
-    // Removes @actor from the set of actors that are allowed to
-    // process events during a grab.
-    removeActor(actor) {
-        let index = this._actors.indexOf(actor);
-        if (index != -1)
-            this._actors.splice(index, 1);
-        if (actor.__grabHelperDestroyId) {
-            actor.disconnect(actor.__grabHelperDestroyId);
-            delete actor.__grabHelperDestroyId;
-        }
-    }
-
     _isWithinGrabbedActor(actor) {
         let currentActor = this.currentGrab.actor;
         while (actor) {
-            if (this._actors.includes(actor))
-                return true;
             if (actor == currentActor)
                 return true;
             actor = actor.get_parent();
@@ -291,9 +261,6 @@ var GrabHelper = class GrabHelper {
             return Clutter.EVENT_PROPAGATE;
         }
 
-        if (this._isWithinGrabbedActor(event.get_source()))
-            return Clutter.EVENT_PROPAGATE;
-
         if (Main.keyboard.shouldTakeEvent(event))
             return Clutter.EVENT_PROPAGATE;